package com.hue.concurrent.day01;

/*
    使用yield或者sleep防止cpu占用100%
 */
public class Demo08 {
    public static void main(String[] args) {
        while (true){
//            Thread.yield();
            try {
                Thread.sleep(1);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
